import { request } from '@umijs/max';

export const login = async (data: UserAPI.UserReq): Promise<any> => {
  return request<UserAPI.UserRes>('/api/login', {
    method: 'POST',
    data,
    withCredentials: true,
  });
};
